<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBookDetailsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('book_details', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('book_list_id')->comment('期刊id')->nullable();
            $table->string('book_name')->comment('期刊名字')->nullable();
            $table->string('book_summary')->comment('期刊简介')->nullable();
            $table->string('column_name')->comment('分卷名字')->nullable();
            $table->string('article_id')->comment('文章id')->nullable();
            $table->string('article_title')->comment('文章标题')->nullable();
            $table->text('article_content')->comment('文章内容')->nullable();
            $table->string('content_size')->comment('文章内容大小')->nullable();
            $table->string('img_url')->comment('imgurl')->nullable();
            $table->string('key_list')->comment('key_list')->nullable();
            $table->string('summary')->comment('文章摘要')->nullable();
            $table->string('first_img')->comment('文章缩略图')->nullable();
            $table->integer('is_cover')->comment('是否覆盖')->nullable();
            $table->integer('sort')->comment('排序')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('book_details');
    }
}
